
#ifndef Ring_h
#define Ring_h

#include "Primitive.h"
#include "Point.h"
class Ray;

class Ring : public Primitive {
 public:
  Ring(Material* material, const Point& center, const Vector& normal, double radius1, double radius2);
  virtual ~Ring();

  virtual void getBounds(BoundingBox& bbox) const;
  virtual void intersect(HitRecord& hit, const RenderContext& context, const Ray& ray) const;
  virtual void normal(Vector& normal, const RenderContext& context,
                      const Point& hitpos, const Ray& ray, const HitRecord& hit) const;
 protected:
  Point center;
  Vector my_normal;
  double inner_radius, outer_radius;
  double d;
};

#endif
